#!/usr/bin/python
# -*- coding: utf-8 -*-

#-------------------------------------------------
#Create At: 2008-5-30 上午01:43:57 
#Create By: Fla.sam
#
#DESC: this file will test mercurial's performance
#
#-------------------------------------------------

from mercurial import ui, hg

u = ui.ui()  # get a ui object
r = hg.repository(u, "D:\\hg") # get a repo object for the current directory
c = r.changectx("tip") # get a context object for the "tip" revision

# show some information about the changeset
print c # represented as the changeset hash
print c.user()
print c.description()
print

# let's take a peek at the files
files = c.files()
for f in files:
 fc = c[f]
 print " ", f, len(fc.data())